//验证码部分
	var span1=document.getElementById("span1");
	var span2=document.getElementById("span2");
	var span3=document.getElementById("span3");
	var span4=document.getElementById("span4");
function rndCode(){
	var str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
	var len = str.length;
	var ind1 = parseInt(Math.random()*len);	
	var ind2 = parseInt(Math.random()*len);
	var ind3 = parseInt(Math.random()*len);
	var ind4 = parseInt(Math.random()*len);
	return str[ind1]+str[ind2]+str[ind3]+str[ind4];
	
}

//// 把随机验证码显示在页面上
yanzhengma.innerHTML = rndCode();	// 先执行函数，该函数的返回值，赋给innerHTML属性上
// 刷新验证码
yanzhengma.onclick = function(){
	yanzhengma.innerHTML = rndCode();
	yanzhengma.style.color=fn();
}
input7.onclick = function(){
	yanzhengma.innerHTML = rndCode();
	yanzhengma.style.color=fn();
}


function fn(){
				var r=Math.round(Math.random()*255);
				var g=Math.round(Math.random()*255);
				var b=Math.round(Math.random()*255);
	return "rgb("+r+","+g+","+b+")"
}	
//验证码验证
function chkCode(){
	/*
	"aB".toLowerCase()将字符串转为小写
	"ab"
	"aB".toUpperCase()将字符串转为大写
	"AB"	
	*/
if( input2.value.toLowerCase() == yanzhengma.innerHTML.toLowerCase() ){
			span4.style.display="none"
			span3.style.display="none"
	}else{
		span4.style.display="block"
	}
	
}
input2.onblur = chkCode;


//input1事件
function in1(){
	
	var shouji=/^13\d{9}$/;
	if(i1=input1.value.match(shouji)){
		span1.style.display="none"
	}else{
		span1.style.display="block"}
	if(input1.value==""){
		span2.style.display="block"
	}else{
		span2.style.display="none"}

}
input1.onblur=in1;
//注册获取cookie
input7.onclick=function(){
	var input11=input1.value;
	var input55=input5.value;
setCookie("coo",input11)
setCookie("coo1",input55)
console.log(getCookie("coo"))
}


	
